// 2013-10-25下午02:49:23  net.betou.trade.entity.main.base.BaseAccount.java

package net.betou.trade.entity.main.base;

import java.io.Serializable;

import net.betou.trade.entity.main.AgentAndAdmins;
import net.betou.trade.entity.main.Funds;

/**
 * 管理员 资金账户类
 * 
 * @author 叶装装
 */
public class BaseFunds implements Serializable{

	private java.lang.Integer id;
	private Integer smsNum; // 短信数量

	// one to one
	private AgentAndAdmins admin;
	private static final long serialVersionUID = 8662284717438359567L;

	public java.lang.Integer getId( ) {
		return id;
	}

	public void setId( java.lang.Integer id ) {
		this.id = id;
	}

	public Integer getSmsNum( ) {
		return smsNum;
	}

	public void setSmsNum( Integer smsNum ) {
		this.smsNum = smsNum;
	}

	public AgentAndAdmins getAdmin( ) {
		return admin;
	}

	public void setAdmin( AgentAndAdmins admin ) {
		this.admin = admin;
	}

	private int hashCode = Integer.MIN_VALUE;

	public int hashCode( ) {
		if( Integer.MIN_VALUE == this.hashCode ){
			if( null == this.getId( ) )
				return super.hashCode( );
			else{
				String hashStr = this.getClass( ).getName( ) + ":" + this.getId( ).hashCode( );
				this.hashCode = hashStr.hashCode( );
			}
		}
		return this.hashCode;
	}

	public boolean equals( Object obj ) {
		if( null == obj )
			return false;
		if( !( obj instanceof Funds ) )
			return false;
		else{
			Funds ext = ( Funds ) obj;
			if( null == this.getId( ) || null == ext.getId( ) )
				return false;
			else
				return( this.getId( ).equals( ext.getId( ) ) );
		}
	}

}
